﻿using IntelligentAgriculture.Domain.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IntelligentAgriculture.Domain.Interface
{
    public interface IRoleRepository
    {
        /// <summary>
        ///  获取所有角色
        /// </summary>
        /// <returns></returns>
        Task<List<Role>> GetRolesAsync();
        /// <summary>
        ///  添加角色
        /// </summary>
        /// <param name="role"> 角色实体 </param>
        /// <returns>返回受影响行数</returns>
        Task<int> AddRole(Role role);
        /// <summary>
        ///  删除角色
        /// </summary>
        /// <param name="id">角色ID</param>
        /// <returns></returns>
        Task<int> DeleteRole(int id);
        /// <summary>
        /// 获取角色选择列表
        /// </summary>
        /// <returns></returns>
        Task<List<Role>> GetRoleSelect();
    }
}
